home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
scilab
/
man
/
man-part1
/
cat2
/
xsegs.2
< prev
next >
Wrap
Text File
|
1999-09-16
|
1KB
|
67 lines
xsegs(2) Scilab Function xsegs(2)
NAME
xsegs - draw unconnected segments
CALLING SEQUENCE
xsegs(nx,ny,[style])
PARAMETERS
nx,ny : two matrices of the same size 2*n
style : a matrix of size n or a scalar. If style is a positive
scalar it gives the dash style to use for all segments, if
it is a negative scalar then current dash style is used, if
it is a vector style[i] gives the style to use for segment
i.
DESCRIPTION
this function draws a set of unconnected segments given by nx,ny which are
internally considered as vectors ( using the Fortran storage convention).
The coordinates of the two points defining a segment are given by two con-
secutive values of nx and ny.
(nx[i],ny[i])-->(nx[i+1],nx[i+2])
Using matrices of size (2,.) the segments can be defined by
nx=[ xi_1,xi_
xf_1,xf_2,... ]
ny=[ yi_1,yi_2,.....;
yf_1,yf_2,... ]
the segments are then (xi_k,yi_k)->(xf_k,yf_k)
EXAMPLE
x=2*%pi*(0:9)/8;
x1=[sin(x);9*sin(x)];
y1=[cos(x);9*cos(x)];
plot2d([-10,10],[-10,10],[-1,-1],"022");
xset('clipgrf')
xsegs(x1,y1,0:9);
xset('clipoff')
AUTHOR
C. J.Ph